import Vue from "vue";
import VueRouter from "vue-router";
import HelloWorld from '../components/HelloWorld.vue'
import About from '../components/About.vue'
import Index from '../views/index.vue'
import ScrollTest from '../views/components/scroll2.vue'

Vue.use(VueRouter);

const router = new VueRouter({
    mode: 'hash', // 使用 hash 模式
    routes: [
        {
            path: '/',
            name: 'Redir',
            component: Index
        },
        {
            path: '/index',
            name: 'Index',
            component: Index
        },
        {
            path: '/hello',
            name: 'Home',
            component: HelloWorld
        },
        {
            path: '/about',
            name: 'About',
            component: About
        },
        {
            path: '/scroll',
            name: 'Scroll',
            component: ScrollTest
        },
        {
            path: "/tooltip",
            name: "tooltip",
            component: () => import("../views/components/tooltip.vue"),
        },
        {
            path: "/i18n",
            name: "i18n",
            component: () => import("../views/components/i18n.vue"),
        },
        {
            path: "/refresh",
            name: "refresh",
            component: () => import("../views/components/refresh.vue"),
        },
        {
            path: "/markdown",
            name: "markdown",
            component: () => import("../views/markdown/markdown.vue"),
        },
        {
            path: "/markdown-it",
            name: "markdown-it",
            component: () => import("../views/markdown/markdown-it.vue"),
        },
        {
            path: "/markdown-it-vue",
            name: "markdown-it-vue",
            component: () => import("../views/markdown/markdown-it-vue.vue"),
        },
        {
            path: "/MdPreview",
            name: "MdPreview",
            component: () => import("../views/markdown/MdPreview.vue"),
        },
        {
            path: "/Audio",
            name: "Audio",
            component: () => import("../views/audio/audio.vue"),
        },
        {
            path: "/media",
            name: "media",
            component: () => import("../views/audio/media.vue"),
        },
        {
            path: "/siri",
            name: "siri",
            component: () => import("../views/siri-animation/index.vue"),
        },
        {
            path: "/background",
            name: "background",
            component: () => import("../views/components/background.vue"),
        },
        {
            path: "/resize",
            name: "resize",
            component: () => import("../views/components/resize.vue"),
        },
        {
            path: "/draggable",
            name: "draggable",
            component: () => import("../views/draggable/index.vue"),
        },
        {
            path: "/test",
            name: "test",
            component: () => import("../views/test2.vue"),
        },
    ]
});

export default router;